The present invention relates to a method and apparatus for bit rate allocation in a multi-channel video data encoder. The invention relates generally to statistical multiplexing, wherein a bit rate (e.g., bandwidth) is allocated to the different channels based on the channels' bit rate needs and the overall available bandwidth.
Statistical multiplexing is the process of encoding a number of signals at variable bit rates and combining the variable-rate bitstreams into a single fixed-rate transport stream so that the bandwidth allotted to each signal is flexible and varies with each signal's bit rate need. Conventionally, an estimate of bit rate need is made based on signal statistics. After a bit rate is allocated based on the need, the data in each signal is compressed and encoded using a specific quantization level. The amount of data that results from the compression is examined in each channel, and the quantization level is adjusted so that channels with more encoded data receive a higher bit rate. Next, the video data is compressed and encoded again using the adjusted quantization level. The process may be repeatedly successively in multiple feedback cycles. Other conventional techniques attempt to equalize a quantization distortion measure across the channels.
However, the conventional techniques have various drawbacks. For example, the use of successive feedback cycles in the compressor can be time-consuming and computationally intensive. Additionally, special bit rates needs for specific types of video scenes may not be considered. Moreover, the equalization of a quantization distortion measure does not reliably translate to an equalization of perceived image quality.
Accordingly, it would be desirable to provide a high-performance dynamic rate allocation system that quickly and accurately allocates bit rate to a plurality of video channels to equalize the overall image quality of all channels at any time instant. The system should provide a pre-processor which measures statistical information of the video data prior to compression and encoding to estimate the relative bit rate required to adequately encode each video scene. The measurements should be made sufficiently early in the encoding process to eliminate undesirable time delays. The system should provide the allocated bit rate to the video compressor from the pre-processor in a feedforward path to avoid undesirable feedback. The system should also provide the capability for feedback processing to fine tune the allocated bit rate before providing it to the compressor.
Furthermore, the system should measure or detect at least some of the following characteristics of each video frame (e.g., picture): spatial activity, temporal activity, image size, frame rate, scene change, brightness, flash, fade, and horizontal pixel resolution. The system should bias the bit rate allocation according to inter-frame distance, whether the average spatial activity level is below a lower threshold, whether the inter-frame distance is above an upper threshold or below a lower threshold, whether the quantization of previous frames is above an upper threshold, the length of the Group of Pictures (GOP), and a user-selectable priority factor.
The system should also allocate any surplus bit rate, if any, among the channels, to avoid having unused bandwidth.
The system should be compatible with progressive or interlaced video, as well as different image shapes and sizes, including Video Object Planes (VOPs).
The system should further be compatible with different video standards including NTSC, PAL, and NTSC detelecine.
The system should provide a pre-processor which can be used with existing commercially available compression circuitry to allow quick and inexpensive retrofitting of such circuitry.
The present invention provides a system having the above and other advantages.